package org.ctstudio.common.bean;

public abstract class NamedObject extends IdentifiedObject {

  private static final long serialVersionUID = 3846494539907765572L;

  private String name;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String toString() {
    return this.getName();
  }

  protected Object clone() throws CloneNotSupportedException {
    NamedObject obj = (NamedObject) super.clone();
    obj.name = this.name;
    return obj;
  }

  public NamedObject() {
    super();
  }

  public NamedObject(Long id, String name) {
    super(id);
    this.setName(name);
  }
}
